package com.itheima.chapter11.udp;

import java.io.IOException;
import java.net.*;

public class SendDemo {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds =new DatagramSocket(8888);
        byte[] bys ="Hello，UDP 我来了".getBytes();
        InetAddress byName = InetAddress.getByName("DESKTOP-DI9RER3");
        int port =10086;
        DatagramPacket dp =new DatagramPacket(bys,bys.length,byName,port);
        ds.send(dp);
        ds.close();


    }
}
